//
//  ReceiptAdressView.m
//  News
//
//  Created by weige on 16/6/12.
//  Copyright © 2016年 weige. All rights reserved.
//

#import "ReceiptAdressView.h"
@interface ReceiptAdressView()
{
    UIImageView *topimgaeView;
    UIImageView *bottomimageView;
    UILabel *labName_b;
    UILabel *labTel_b;
    UILabel *labAdress_b;
    UILabel *labName;
    UILabel *labTel;
    UILabel *labAdress;
    UIButton *modfiyBtn;
    UIImageView *arrowImageView;
}
@end
@implementation ReceiptAdressView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createViewUI];
    }
    return self;
}
-(void)createViewUI
{
    self.backgroundColor=[UIColor whiteColor];
    topimgaeView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"v2_shoprail"]];
    [self addSubview:topimgaeView];
    bottomimageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"v2_shoprail"]];
    [self addSubview:bottomimageView];
    labName=[[UILabel alloc]init];
    labName.textAlignment=NSTextAlignmentCenter;
    labName.font=[UIFont systemFontOfSize:12];
    labName.text=@"收  货  人  ";
    labName.textColor=[UIColor blackColor];
    [self addSubview:labName];
    labTel=[[UILabel alloc]init];
    labTel.textAlignment=NSTextAlignmentCenter;
    labTel.font=[UIFont systemFontOfSize:12];
    labTel.text=@"电       话  ";
    labTel.textColor=[UIColor blackColor];
    [self addSubview:labTel];
    labAdress=[[UILabel alloc]init];
    labAdress.textAlignment=NSTextAlignmentCenter;
    labAdress.font=[UIFont systemFontOfSize:12];
    labAdress.text=@"收货地址  ";
    labAdress.textColor=[UIColor blackColor];
    [self addSubview:labAdress];

    
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    topimgaeView.frame=CGRectMake(0, 0, self.frame.size.width, 2);
    bottomimageView.frame=CGRectMake(0, self.frame.size.height-2, self.frame.size.width, 2);
    labName.frame=CGRectMake(10, 10,ReceiptSize(labName.text, 12).width,ReceiptSize(labName.text, 12).height);
    labTel.frame=CGRectMake(10, CGRectGetMaxY(labName.frame)+5, ReceiptSize(labTel.text, 12).width, ReceiptSize(labTel.text, 12).height);
    
    labAdress.frame=CGRectMake(10, CGRectGetMaxY(labTel.frame)+5, ReceiptSize(labAdress.text, 12).width, ReceiptSize(labAdress.text, 12).height);
    

}

@end
